package org.linuxsogood.boot.quartz;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author honway.liu
 * @date 2018/9/19 下午9:58
 * @email gm100861@gmail.com
 * @blog http://linuxsogood.org
 */
public class MyJob implements Job {

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        System.out.println("Job在执行, 当前时间:" + dateFormat.format(new Date()));
    }
}
